4. Evaluating Policies
You can evaluate policies
against registered servers or an entire server group using central
management servers. The great thing about evaluating policies against
multiple servers is that you can simply click a check box to apply the
necessary changes to the noncompliant servers.
NOTE
Only certain policies
will be valid with each version. For example, since Database Mail was
introduced in SQL Server 2005, it would not be a valid to perform a
check on a SQL 2000 server that required Database Mail to be enabled.
You may want to add a server restriction on policies that are version
or edition specific to prevent excessive failures.
To evaluate a policy
against multiple servers, right-click on a server group and select
Evaluate Policies from the context menu. We will be using the
Production group created in the "Creating a Central Management Server" section earlier in this chapter. This will bring up the Evaluate Policies dialog box, as shown in Figure 7.
Notice that the group name that we will be evaluating is displayed in
the title of the dialog box; in our case the title is Evaluate Policies
- Production.
Now you need to choose the
source for the policy or policies you would like to evaluate. Click the
ellipsis next to the Source field to bring up the Select Source dialog
box shown in Figure 8.
As you can see in Figure 8,
you have the ability to use files or a server that contains policies as
a source to obtain the policy information to evaluate. If you choose to
use a server as the source, you can enter the connection information
for any server that contains a valid policy. (The policies will be
displayed in the Evaluate Policies dialog box, as shown in Figure 11.) In the Select
Source dialog, select the ellipsis next to the Files text box to open
the Select Policy dialog box, as shown in Figure 9.
One nice feature is that
you are allowed to select multiple policy files to evaluate. Navigate
to the C:\Program Files\Microsoft SQL
Server\100\Tools\Policies\DatabaseEngine\1033\ directory if you are not
already there, and then select a couple of polices you would like to
evaluate by holding the Ctrl key and clicking each policy. Figure 9
shows the policies we have selected. Once you have selected the
policies, click Open to return to the Select Source dialog box. You
should now see the files you selected in the Files text box. Click OK
to close the Select Source dialog box and load the policies. This will
open the Loading Policies dialog box, displayed in Figure 10.
Once you have successfully
loaded the policies, click Close to return to the Evaluate Policies
dialog box, which will now show all the policies you included in the
Select Source dialog box (see Figure 11).
You can review each
policy configuration and description by selecting the policy name link
from the Policy column. Make sure each policy that you would like to
evaluate is checked and click Evaluate. This will evaluate each policy
and take you to the Evaluate Policies results page, as shown in Figure12.
Each policy that
succeeds against all the servers will be indicated with a green check
mark, and any policy that has a noncompliant server will be displayed
with a red X. If you select a specific policy, you can see the results
in the Target details table. Also, certain policies that contain
failures have a check box beside them. This check box indicates that
SQL Server can automatically apply changes to the server that will make
them compliant with the policy. If you select the check box beside the
policy, it will automatically check all the noncompliant servers. You
can uncheck any server you do not wish to be affected by the changes
and click Apply. Click Close to exit the evaluation. There you have
it—in just a few clicks, you are able evaluate and manage policies
across multiple servers in the organization.